namespace Vuscode.Framework.NHibernate.Conventions
{
    using FluentNHibernate.Conventions;
    using FluentNHibernate.Conventions.Inspections;
    using FluentNHibernate.Conventions.Instances;

    public class PrimaryKeyConvention : IIdConvention 
    {
        public void Apply(IIdentityInstance instance)
        {
            instance.Column(instance.EntityType.Name + "ID");
            instance.GeneratedBy.HiLo("100");
            instance.Access.ReadOnlyPropertyThroughCamelCaseField(CamelCasePrefix.None);
            
        }
    }
}